package cn.gson.boot.model.dao;

import cn.gson.boot.model.pojos.CFGMDingdanxiangqing;
import cn.gson.boot.model.pojos.Dingdanxiangqing;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import javax.transaction.Transactional;
import java.util.List;

public interface CFGMDinDanXiangQingDao extends CrudRepository<CFGMDingdanxiangqing,Integer> {


   /* //修改后台时会重复新增订单详情，所以先根据订单id删除一下
    @Transactional
    @Modifying(clearAutomatically = true)
    @Query(nativeQuery = true,value = "delete from dingdanxiangqing where dd_id = ?1")
    public void deleteDinDanXiangQing(Integer ddid);*/

/*
    //查看订单id查看订单详情
    @Query(nativeQuery = true,value = "select * from dingdanxiangqing where dd_id = ?1")
    public List<CFGMDingdanxiangqing> ckDingDanXiangQing(Integer ddid);*/
}
